public class Main {
    public static void main(String[] args) {
        Director director = new Director();

        // 使用建造者A构建汽车
        CarBuilder builderA = new CarBuilderA();
        director.setCarBuilder(builderA);
        Car carA = director.construct();

        // 使用建造者B构建汽车
        CarBuilder builderB = new CarBuilderB();
        director.setCarBuilder(builderB);
        Car carB = director.construct();

        // 输出汽车信息
        System.out.println("Car A:");
        System.out.println("Engine: " + carA.getEngine());
        System.out.println("Wheels: " + carA.getWheels());
        System.out.println("Seats: " + carA.getSeats());

        System.out.println("\nCar B:");
        System.out.println("Engine: " + carB.getEngine());
        System.out.println("Wheels: " + carB.getWheels());
        System.out.println("Seats: " + carB.getSeats());
    }
}
